#define SPI_PORT	B
#define SPI_SCK		(1<<PB5)
#define SPI_MOSI	(1<<PB3)

// RFM02 radio transmitter
#define RFM_SOFTWARE	0
#define RFM_BUFFER	20
#define RFM_BAND	868
#define RFM_CLOCKOUT	0
#define RFM_SS_PORT	D
#define RFM_SS_PIN	(1<<PD6)
#define RFM_FSK_PORT	D
#define RFM_FSK_PIN	(1<<PD0)
#define RFM_IRQ_PORT	D
#define RFM_IRQ_PIN	(1<<PD3)
#define RFM_IRQ_NAME	INT1
#define RFM_IRQ_VECTOR	INT1_vect
#define RFM_IRQ_ISC1	ISC11
#define RFM_IRQ_ISC0	ISC10

#define GLUE(a, b)	a##b
#define PORT(x)		GLUE(PORT, x)
#define PIN(x)		GLUE(PIN, x)
#define DDR(x)		GLUE(DDR, x)

#define setBits(port,mask)	do{ (port) |=  (mask); }while(0)
#define clrBits(port,mask)	do{ (port) &= ~(mask); }while(0)

